package com.wxg.tuan.controller.User;

import com.wxg.tuan.result.Result;
import com.wxg.tuan.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/tuan/User")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/send-email/{email}")
    public Result sendEmail(@PathVariable("email") String email){

        return userService.sendEmail(email);
    }


    @PostMapping("{email}/{code}")
    public Result emailLogin(@PathVariable("email") String email,@PathVariable("code") String code)
    {
        return userService.emailLogin(email,code);
    }







}
